Use layout control nodes to arrange content. Layout control nodes are especially useful for content that is dynamically added or removed during the use of a Kanzi application, or that is loaded from external sources, for example, from files in a directory.
Arrange items in a table with Grid Layout nodes. Learn about the Grid Layout nodes >
|
Place items next to each other with Stack Layout nodes. |
Arrange items in rows with Flow Layout nodes. Learn about the Flow Layout nodes >
|
Arrange items along a trajectory with the Trajectory Layout nodes. |
Arrange items relative to each other along the sides of a layout with the Dock Layout nodes. Learn about the Dock Layout nodes >
|
To position items in your Kanzi applications you can use these transformation types:
Layout control nodes, such as Stack Layout and Grid Layout nodes, apply their own transformations on all immediate child nodes who in their part define their own layout considering their own child nodes, layout transformations, margins and alignments.
For example, a Stack Layout node set in direction on the x axis places its two child nodes next to each other based on the their dimensions (bounding boxes). By using the Layout Width property you can override the width of the bounding box: a value smaller than the size of the node makes the node overlap, and a value larger than the size of the node extends the space between the two nodes.
After all the layout tasks are done, Kanzi applies the final transformations from the parent nodes. The RootPage under the Screen node has special rules for its layout if it is a Viewport 2D or an Empty Node 2D. It inherits the defined screen size, unless defined by the layout properties.
Using the Trajectory Layout nodes